package com.teach.servlet.admin;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.teach.service.LjService;
import com.teach.service.impl.LjServiceImpl;

//@WebServlet("/admin/lj-list-2.let")
public class LjList2Servlet extends HttpServlet{
	
	private LjService ljService = new LjServiceImpl();
	
	@Override
	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

		int current = 1;
		try{
			current = Integer.valueOf(request.getParameter("current"));
		}catch(Exception ex){
		}
		
		int rowMax = 10;
		try{
			rowMax = Integer.valueOf(request.getParameter("rowMax"));
		}catch(Exception ex){
		}
		
		request.setAttribute("p", ljService.page(current, rowMax));
		request.getRequestDispatcher("/admin/lj-list-2.jsp").forward(request, response);
	}
}
